function foo(val){
    console.log(val.length);
}

foo("Hello World");
foo("你好,李银河")
foo("你好,李银河3434")